define(()=>{
    return function(goodsMsg, id, cb){
        // console.log(goodsMsg)
        let i = 0;
        goodsMsg.some((val,idx)=>{
            i = idx;
            return val.id === id;
        });
        // 要进行的修改操作
        cb(i);
        localStorage.setItem("goodsMsg",JSON.stringify(goodsMsg));
    }
})